import React from 'react'
import { Select } from 'antd'
import { convertContent } from '../../constant/lang-util'

const {Option} = Select

const TagSelectBox = ({handleChange, tags}) => {
  return <Select
    defaultValue='all'
    style={{width: 120}}
    onChange={handleChange}>
    <Option value='all'>{convertContent('全部')}</Option>
    {
      tags.map(tag => <Option value={tag.id}>{tag.name}</Option>)
    }
  </Select>
}

export default TagSelectBox
